package com.jackson.engineeringtechnologyguide.event.listener;

/*
 * Author: JacksonCoder
 * FileName: PushEventListener01
 * Version: 1.0.0
 * Date: 2025/1/11
 */

import com.jackson.engineeringtechnologyguide.event.PushEvent;
import com.jackson.engineeringtechnologyguide.event.PushEventMessage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * 推送事件监听
 */

@Slf4j
@Component
public class PushEventListener01 implements ApplicationListener<PushEvent> {

    @Async("eventAsyncTaskExecutor")
    @Override
    public void onApplicationEvent(PushEvent event) {
        PushEventMessage message = (PushEventMessage) event.getSource();
        log.info("...");
    }
}
